﻿/*
 * ========================================================================
 * Copyright(c) 2008-2010北京高阳金信信息技术有限公司, All Rights Reserved.
 * ========================================================================
 *  资讯解读WCF服务
 * 
 * 作者：常晏玮     时间：2010-06-09
 * 版本：V1.0
 * 
 * 修改者：         时间：                
 * 修改说明：
 * ========================================================================
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Activation;
using NBFWcfService;
using NBFBLL;
using NBFModel;

namespace NBFWcfService
{
    [AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed)]
    public class InfoReadBLLService : IInfoReadBLL
    {
        [WebInvoke(BodyStyle=WebMessageBodyStyle.WrappedRequest,ResponseFormat=WebMessageFormat.Json)]
        public string GetArticleTitle(int ArticleID)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.GetArticleTitle(ArticleID);
        }
       
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
        public List<Query_Tb_Sys_Article> GetArticleTitleList1(string wherestring)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.GetArticleTitleList1(wherestring);
        }

        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
        public List<Tb_Sys_Article> GetArticleTitleList2(string wherestring)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.GetArticleTitleList2(wherestring);
        }
        
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
        public List<Query_tb_zdgl_users> GetCustomerEmailList(int groupid)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.GetCustomerEmailList(groupid);
        }

        [WebGet(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
        public bool PostReview(int ArticleID, string Content, string name, int ReadType, string ProductNumbers)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.PostReview(ArticleID, Content, name, ReadType, ProductNumbers);
        }

        [WebGet(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
        public int AddMyFavorites(int ArticleID)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.AddMyFavorites(ArticleID);
        }
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json,Method="POST")]
        public bool AddArticleSend(string BodyHtml, ArrayList ReceiveMan, string mailtitle)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.AddArticleSend(BodyHtml, ReceiveMan, mailtitle);
        }

        [WebGet(BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
        public List<Query_FT_Compact_Strategy> GetBankStrategy(string wherestring, string ci_id)
        {
            InfoReadBLL irb = new InfoReadBLL();
            return irb.GetBankStrategy(wherestring, ci_id);
        }
       
    }
}
